﻿
using Dora.Orm.SqlSugarCore.UnitOfWork;
using Dora.Services.AdminUser.Dto.QueryDto;
using Dora.Services.AdminUser.Entities;
using Dora.Services.AdminUser.IApplication;
using Dora.Services.AdminUser.Repository.Repositorys;
using Dora.Tools.Utility.Const;
using Microsoft.Extensions.Logging;
using Surging.Core.Common;
using Surging.Core.CPlatform.Ioc;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Dora.Services.AdminUser.Application.Base;
using Dora.Tools.Utility;
using System.Linq;
using Dora.Services.AdminUser.Dto.ViewDto;
using Dora.Tools.Utility.Models;
using Dora.Tools.Enums.AdminUser;
using Dora.Services.AdminUser.Dto.SaveDto;
using Dora.Tools.Utility.Redis;
using Dora.Services.AdminUser.Repository;
using Dora.Tools.Enums;
using Servicecomb.Saga.Omega.Abstractions.Transaction;
using Servicecomb.Saga.Omega.Core.Diagnostics;
using System.Net.Http;

namespace Dora.Services.AdminUser.Application
{
    /// <summary>
    /// 旅行社用户表服务
    /// </summary>
    [ModuleName(DoraModuleName.AdminUser)]
    public class TasUserService : DoraServiceBase, ITasUserService
    {




        public TasUserService()
        {
        }


        

        [Compensable(nameof(TestTransaction))]
        public async Task<bool> Login(string userName, string pwd, string ip, string systemKey)
        {
            Console.WriteLine("开始查询用户");
          

            Console.WriteLine("结束查询用户");
            return await Task.FromResult(true);

        }

        private Task<string> TestTransaction(string userName, string pwd, string ip, string systemKey)
        {
            var msg = "正在回滚分布式事务";
            Console.WriteLine(msg);
            return Task.FromResult(msg);
        }
       
    }
}
